package com.icart.repositories;


import com.icart.entities.WoServbookEntity;
import org.springframework.context.annotation.Scope;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

@Repository
@Scope("prototype")
public interface ServbookRepository extends BaseRepository<WoServbookEntity,Integer> {
    @Transactional
    @Query(nativeQuery = true,value = "insert into wo_servbook(bookseq,custid,custcarid,carno,curkilo,regdate,linkman,linktel,busiid,chnid,bookdate,booktime,staffid,createtime,stat,bookcode) values(?1,?2,?3,?4,?5,?6,?7,?8,?9,?10,?11,?12,?13,?14,?15,?16)")
    @Modifying(clearAutomatically = true)

    Integer insert(Long bookseq,Long custid, Long custcarid, String carno, Long curkilo, String regdate, String linkman, String linktel,Long busiid,Long chnid,String bookdate,String booktime,Long staffid,String createtime,int stat,String bookcode);
}
